<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<link rel="shortcut icon" href="assets/ico/favicon32.ico" type="image/x-icon" />
		<title>数据大屏</title>
	</head>
	<body>
		<script src="lib/jquery/jquery-3.0.0.min.js"></script>
		<script src="common/common.js"></script>
		<script>
			$(function() {
				window.location.href = "page/workbench/workbench.html"
				return;
				
				
				if (!token) {
					var key = getUrlParam("key");
					if (!key) {
						goError("403", "未获取到授权信息！");
					} else {
						$.ajax({
							type: "post",
							url: ctp + "/show/getToken",
							cache: false,
							data: {
								"key": key
							},
							success: function(result) {
								if (result.code == "200") {
									localStorage.setItem("data_view_token", result.data);
									window.location.href = "page/workbench/workbench.html"
								} else {
									localStorage.removeItem("data_view_token");
									goError(result.code, result.msg);
								}
							},
							error: function(XMLHttpRequest, textStatus, errorThrown) {
								alert("网络异常");
							}
						});
					}
				} else {
					$.ajax({
						type: "post",
						url: ctp + "/show/authToken",
						cache: false,
						data: {
							"token": token
						},
						success: function(result) {
							if (result.code == "200") {
								localStorage.setItem("data_view_token", result.data);
								window.location.href = "page/workbench/workbench.html"
							} else {
								localStorage.removeItem("data_view_token");
								goError(result.code, result.msg);
							}
						},
						error: function(XMLHttpRequest, textStatus, errorThrown) {
							alert("网络异常");
						}
					});
				}
			});
		</script>
	</body>
</html>
